<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>   
</head>
<script src="../JS/jquery-3.5.1.js"></script>
<body>
    <h2>jQuery对象转换成DOM对象</h2>
        <p id="foo">Foo</p>
        <p id="bar">Bar</p>
        <script type="text/javascript" src="js/jQuery/jquery.min.js" ></script>
        <script type="text/javascript">
        //方法一
        var $foo=$("#foo");
        //从jQuery对象中获得下标为0的DOM元素，并调用DOM属性
        $foo[0].innerHTML="foo DOM";
        
        //方法二
        var $p=$("p");
        //从jQuery对象中获得下标为1的DOM元素，并调用DOM属性
        $p.get(1).innerHTML="bar DOM";
        </script>
</body>

<script src="../JS/2020-12-30.js"></script>
</html>